import java.sql.Timestamp;

public class MainComment extends Comment {
    private int replyCount;

    public MainComment(int id, User user, String content, Timestamp timestamp) {
        super(id, content, user, timestamp);
    }

    public MainComment(int id, User user, String content, Timestamp timestamp,int likeCount ) {
        super(id,content,user,timestamp);
        this.setLikeCount(likeCount);
    }

    public int getReplyCount() {
        return replyCount;
    }

    public void setReplyCount(int replyCount) {
        this.replyCount = replyCount;
    }

    @java.lang.Override
    public java.lang.String toString() {
        return  "id: " + getId() +
                ", 由用户 '" + getUserNickname() +
                " ' 发表的评论，内容为：'" + getContent() + '\'' +
                ", 发表时间：" + getTimestamp() +
                ", 点赞数：" + getLikeCount() +
                ", 共" + replyCount +"条回复";
    }
}